using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Turquoise.EntityGenerator.Models.Mapping
{
    public class ContentCategoryLanguageLineHistoryMap : EntityTypeConfiguration<ContentCategoryLanguageLineHistory>
    {
        public ContentCategoryLanguageLineHistoryMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.ContentCategoryName)
                .IsRequired()
                .HasMaxLength(400);

            this.Property(t => t.ContentCategoryDescription)
                .HasMaxLength(500);

            this.Property(t => t.ContentCategoryKeywords)
                .HasMaxLength(500);

            // Table & Column Mappings
            this.ToTable("ContentCategoryLanguageLineHistory");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.ContentCategoryLanguageLineId).HasColumnName("ContentCategoryLanguageLineId");
            this.Property(t => t.LanguageId).HasColumnName("LanguageId");
            this.Property(t => t.ContentCategoryId).HasColumnName("ContentCategoryId");
            this.Property(t => t.ContentCategoryName).HasColumnName("ContentCategoryName");
            this.Property(t => t.ContentCategoryDescription).HasColumnName("ContentCategoryDescription");
            this.Property(t => t.ContentCategoryKeywords).HasColumnName("ContentCategoryKeywords");
            this.Property(t => t.CreateDate).HasColumnName("CreateDate");
            this.Property(t => t.CreatedBy).HasColumnName("CreatedBy");
            this.Property(t => t.PublishBeginDate).HasColumnName("PublishBeginDate");
            this.Property(t => t.PublishEndDate).HasColumnName("PublishEndDate");
            this.Property(t => t.DisplayOrder).HasColumnName("DisplayOrder");
            this.Property(t => t.IsApproved).HasColumnName("IsApproved");
            this.Property(t => t.VersionNo).HasColumnName("VersionNo");
            this.Property(t => t.RestoreVersionNo).HasColumnName("RestoreVersionNo");
            this.Property(t => t.UpdateDate).HasColumnName("UpdateDate");
            this.Property(t => t.UpdatedBy).HasColumnName("UpdatedBy");
            this.Property(t => t.IsDeleted).HasColumnName("IsDeleted");
        }
    }
}
